package cn.ad.server.domain.enumration;

import cn.ad.server.domain.EnumMap;

import java.util.HashMap;
import java.util.Map;

/**
 * 平台资源类型
 * @author wang wei
 */
public enum ResourceType implements EnumMap {

	ADN(1,"ADN"),
	ADX(2,"ADX");

    private int value;

    private String name;

//    public static final Map<Integer, ResourceType> resourceTypeMap;
//
//    static {
//    	resourceTypeMap = new HashMap<>();
//        for (ResourceType actionType : values()) {
//        	resourceTypeMap.put(actionType.getValue(), actionType);
//        }
//    }
    public static final Map<String, ResourceType> resourceTypeMap;
    
    static {
    	resourceTypeMap = new HashMap<>();
    	for (ResourceType actionType : values()) {
    		resourceTypeMap.put(actionType.getName(), actionType);
    	}
    }

    ResourceType(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

}
